package com.pptiku.jh.routerdemo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Interceptor;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;

@Route(path = "/business/activ")
public class HandleActivity extends AppCompatActivity
{
    @Autowired
    public String name;
    @Autowired
    public int age;

    private TextView tvName, tvAge;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_handle);
        tvName = findViewById(R.id.name);
        tvAge = findViewById(R.id.age);

        ARouter.getInstance().inject(this);

        tvAge.setText(String.valueOf(age));
        tvName.setText(name);

    }
}
